(0) Obligation:

Clauses:

ss(Xs, Ys) :- ','(perm(Xs, Ys), ordered(Ys)).
perm([], []).
perm(Xs, .(X, Ys)) :- ','(app(X1s, .(X, X2s), Xs), ','(app(X1s, X2s, Zs), perm(Zs, Ys))).
app([], X, X).
app(.(X, Xs), Ys, .(X, Zs)) :- app(Xs, Ys, Zs).
ordered([]).
ordered(.(X1, [])).
ordered(.(X, .(Y, Xs))) :- ','(less(X, s(Y)), ordered(.(Y, Xs))).
less(0, s(X2)).
less(s(X), s(Y)) :- less(X, Y).

Query: ss(g,g)

(1) PrologToPrologProblemTransformerProof (SOUND transformation)

Built Prolog problem from termination graph ICLP10.

(2) Obligation:

Clauses:

appA([], T34, T35, .(T34, T35)).
appA(.(T43, X63), T42, X64, .(T43, T44)) :- appA(X63, T42, X64, T44).
appB([], T58, T58).
appB(.(T65, T66), T67, .(T65, X92)) :- appB(T66, T67, X92).
permC([], []).
permC(T76, .(T77, T78)) :- appA(X107, T77, X108, T76).
permC(T76, .(T77, T78)) :- ','(appA(T83, T77, T84, T76), appB(T83, T84, X109)).
permC(T76, .(T77, T78)) :- ','(appA(T83, T77, T84, T76), ','(appB(T83, T84, T91), permC(T91, T78))).
orderedD(T98, []).
orderedD(T105, .(T106, T107)) :- lessE(T105, T106).
orderedD(T105, .(T106, T107)) :- ','(lessE(T105, T106), orderedD(T106, T107)).
lessF(0, s(T129)).
lessF(s(T134), s(T135)) :- lessF(T134, T135).
lessE(0, T116).
lessE(s(T121), T122) :- lessF(T121, T122).
ssG([], []).
ssG(T13, .(T14, T15)) :- appA(X23, T14, X24, T13).
ssG(T13, .(T14, T15)) :- ','(appA(T20, T14, T21, T13), appB(T20, T21, X25)).
ssG(T13, .(T14, T15)) :- ','(appA(T20, T14, T21, T13), ','(appB(T20, T21, T51), permC(T51, T15))).
ssG(T13, .(T14, T15)) :- ','(appA(T20, T14, T21, T13), ','(appB(T20, T21, T51), ','(permC(T51, T15), orderedD(T14, T15)))).

Query: ssG(g,g)

(3) PrologToPiTRSProof (SOUND transformation)

We use the technique of [TOCL09]. With regard to the inferred argument filtering the predicates were used in the following modes:
ssG_in: (b,b)
appA_in: (f,b,f,b)
appB_in: (b,b,f)
permC_in: (b,b)
orderedD_in: (b,b)
lessE_in: (b,b)
lessF_in: (b,b)
Transforming Prolog into the following Term Rewriting System:
Pi-finite rewrite system:
The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)

Infinitary Constructor Rewriting Termination of PiTRS implies Termination of Prolog

(4) Obligation:

Pi-finite rewrite system:
The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)

(5) DependencyPairsProof (EQUIVALENT transformation)

Using Dependency Pairs [AG00,LOPSTR] we result in the following initial DP problem:
Pi DP problem:
The TRS P consists of the following rules:

SSG_IN_GG(T13, .(T14, T15)) → U12_GG(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
SSG_IN_GG(T13, .(T14, T15)) → APPA_IN_AGAG(X23, T14, X24, T13)
APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → U1_AGAG(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → APPA_IN_AGAG(X63, T42, X64, T44)
SSG_IN_GG(T13, .(T14, T15)) → U13_GG(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_GG(T13, T14, T15, appB_in_gga(T20, T21, X25))
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → APPB_IN_GGA(T20, T21, X25)
APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → U2_GGA(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → APPB_IN_GGA(T66, T67, X92)
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_GG(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_GG(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_GG(T13, T14, T15, permC_in_gg(T51, T15))
U15_GG(T13, T14, T15, appB_out_gga(T20, T21, T51)) → PERMC_IN_GG(T51, T15)
PERMC_IN_GG(T76, .(T77, T78)) → U3_GG(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
PERMC_IN_GG(T76, .(T77, T78)) → APPA_IN_AGAG(X107, T77, X108, T76)
PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_GG(T76, T77, T78, appB_in_gga(T83, T84, X109))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → APPB_IN_GGA(T83, T84, X109)
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_GG(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_GG(T76, T77, T78, permC_in_gg(T91, T78))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → PERMC_IN_GG(T91, T78)
U16_GG(T13, T14, T15, permC_out_gg(T51, T15)) → U17_GG(T13, T14, T15, orderedD_in_gg(T14, T15))
U16_GG(T13, T14, T15, permC_out_gg(T51, T15)) → ORDEREDD_IN_GG(T14, T15)
ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T105, T106, T107, lessE_in_gg(T105, T106))
ORDEREDD_IN_GG(T105, .(T106, T107)) → LESSE_IN_GG(T105, T106)
LESSE_IN_GG(s(T121), T122) → U11_GG(T121, T122, lessF_in_gg(T121, T122))
LESSE_IN_GG(s(T121), T122) → LESSF_IN_GG(T121, T122)
LESSF_IN_GG(s(T134), s(T135)) → U10_GG(T134, T135, lessF_in_gg(T134, T135))
LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)
U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_GG(T105, T106, T107, orderedD_in_gg(T106, T107))
U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → ORDEREDD_IN_GG(T106, T107)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
SSG_IN_GG(x1, x2)  =  SSG_IN_GG(x1, x2)
U12_GG(x1, x2, x3, x4)  =  U12_GG(x4)
APPA_IN_AGAG(x1, x2, x3, x4)  =  APPA_IN_AGAG(x2, x4)
U1_AGAG(x1, x2, x3, x4, x5, x6)  =  U1_AGAG(x1, x6)
U13_GG(x1, x2, x3, x4)  =  U13_GG(x2, x3, x4)
U14_GG(x1, x2, x3, x4)  =  U14_GG(x4)
APPB_IN_GGA(x1, x2, x3)  =  APPB_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x5)
U15_GG(x1, x2, x3, x4)  =  U15_GG(x2, x3, x4)
U16_GG(x1, x2, x3, x4)  =  U16_GG(x2, x3, x4)
PERMC_IN_GG(x1, x2)  =  PERMC_IN_GG(x1, x2)
U3_GG(x1, x2, x3, x4)  =  U3_GG(x4)
U4_GG(x1, x2, x3, x4)  =  U4_GG(x3, x4)
U5_GG(x1, x2, x3, x4)  =  U5_GG(x4)
U6_GG(x1, x2, x3, x4)  =  U6_GG(x3, x4)
U7_GG(x1, x2, x3, x4)  =  U7_GG(x4)
U17_GG(x1, x2, x3, x4)  =  U17_GG(x4)
ORDEREDD_IN_GG(x1, x2)  =  ORDEREDD_IN_GG(x1, x2)
U8_GG(x1, x2, x3, x4)  =  U8_GG(x2, x3, x4)
LESSE_IN_GG(x1, x2)  =  LESSE_IN_GG(x1, x2)
U11_GG(x1, x2, x3)  =  U11_GG(x3)
LESSF_IN_GG(x1, x2)  =  LESSF_IN_GG(x1, x2)
U10_GG(x1, x2, x3)  =  U10_GG(x3)
U9_GG(x1, x2, x3, x4)  =  U9_GG(x4)

We have to consider all (P,R,Pi)-chains

(6) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

SSG_IN_GG(T13, .(T14, T15)) → U12_GG(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
SSG_IN_GG(T13, .(T14, T15)) → APPA_IN_AGAG(X23, T14, X24, T13)
APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → U1_AGAG(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → APPA_IN_AGAG(X63, T42, X64, T44)
SSG_IN_GG(T13, .(T14, T15)) → U13_GG(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_GG(T13, T14, T15, appB_in_gga(T20, T21, X25))
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → APPB_IN_GGA(T20, T21, X25)
APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → U2_GGA(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → APPB_IN_GGA(T66, T67, X92)
U13_GG(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_GG(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_GG(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_GG(T13, T14, T15, permC_in_gg(T51, T15))
U15_GG(T13, T14, T15, appB_out_gga(T20, T21, T51)) → PERMC_IN_GG(T51, T15)
PERMC_IN_GG(T76, .(T77, T78)) → U3_GG(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
PERMC_IN_GG(T76, .(T77, T78)) → APPA_IN_AGAG(X107, T77, X108, T76)
PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_GG(T76, T77, T78, appB_in_gga(T83, T84, X109))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → APPB_IN_GGA(T83, T84, X109)
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_GG(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_GG(T76, T77, T78, permC_in_gg(T91, T78))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → PERMC_IN_GG(T91, T78)
U16_GG(T13, T14, T15, permC_out_gg(T51, T15)) → U17_GG(T13, T14, T15, orderedD_in_gg(T14, T15))
U16_GG(T13, T14, T15, permC_out_gg(T51, T15)) → ORDEREDD_IN_GG(T14, T15)
ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T105, T106, T107, lessE_in_gg(T105, T106))
ORDEREDD_IN_GG(T105, .(T106, T107)) → LESSE_IN_GG(T105, T106)
LESSE_IN_GG(s(T121), T122) → U11_GG(T121, T122, lessF_in_gg(T121, T122))
LESSE_IN_GG(s(T121), T122) → LESSF_IN_GG(T121, T122)
LESSF_IN_GG(s(T134), s(T135)) → U10_GG(T134, T135, lessF_in_gg(T134, T135))
LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)
U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_GG(T105, T106, T107, orderedD_in_gg(T106, T107))
U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → ORDEREDD_IN_GG(T106, T107)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
SSG_IN_GG(x1, x2)  =  SSG_IN_GG(x1, x2)
U12_GG(x1, x2, x3, x4)  =  U12_GG(x4)
APPA_IN_AGAG(x1, x2, x3, x4)  =  APPA_IN_AGAG(x2, x4)
U1_AGAG(x1, x2, x3, x4, x5, x6)  =  U1_AGAG(x1, x6)
U13_GG(x1, x2, x3, x4)  =  U13_GG(x2, x3, x4)
U14_GG(x1, x2, x3, x4)  =  U14_GG(x4)
APPB_IN_GGA(x1, x2, x3)  =  APPB_IN_GGA(x1, x2)
U2_GGA(x1, x2, x3, x4, x5)  =  U2_GGA(x1, x5)
U15_GG(x1, x2, x3, x4)  =  U15_GG(x2, x3, x4)
U16_GG(x1, x2, x3, x4)  =  U16_GG(x2, x3, x4)
PERMC_IN_GG(x1, x2)  =  PERMC_IN_GG(x1, x2)
U3_GG(x1, x2, x3, x4)  =  U3_GG(x4)
U4_GG(x1, x2, x3, x4)  =  U4_GG(x3, x4)
U5_GG(x1, x2, x3, x4)  =  U5_GG(x4)
U6_GG(x1, x2, x3, x4)  =  U6_GG(x3, x4)
U7_GG(x1, x2, x3, x4)  =  U7_GG(x4)
U17_GG(x1, x2, x3, x4)  =  U17_GG(x4)
ORDEREDD_IN_GG(x1, x2)  =  ORDEREDD_IN_GG(x1, x2)
U8_GG(x1, x2, x3, x4)  =  U8_GG(x2, x3, x4)
LESSE_IN_GG(x1, x2)  =  LESSE_IN_GG(x1, x2)
U11_GG(x1, x2, x3)  =  U11_GG(x3)
LESSF_IN_GG(x1, x2)  =  LESSF_IN_GG(x1, x2)
U10_GG(x1, x2, x3)  =  U10_GG(x3)
U9_GG(x1, x2, x3, x4)  =  U9_GG(x4)

We have to consider all (P,R,Pi)-chains

(7) DependencyGraphProof (EQUIVALENT transformation)

The approximation of the Dependency Graph [LOPSTR] contains 5 SCCs with 22 less nodes.

(8) Complex Obligation (AND)

(9) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
LESSF_IN_GG(x1, x2)  =  LESSF_IN_GG(x1, x2)

We have to consider all (P,R,Pi)-chains

(10) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(11) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)

R is empty.
Pi is empty.
We have to consider all (P,R,Pi)-chains

(12) PiDPToQDPProof (EQUIVALENT transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(13) Obligation:

Q DP problem:
The TRS P consists of the following rules:

LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(14) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • LESSF_IN_GG(s(T134), s(T135)) → LESSF_IN_GG(T134, T135)
    The graph contains the following edges 1 > 1, 2 > 2

(15) YES

(16) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → ORDEREDD_IN_GG(T106, T107)
ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T105, T106, T107, lessE_in_gg(T105, T106))

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
ORDEREDD_IN_GG(x1, x2)  =  ORDEREDD_IN_GG(x1, x2)
U8_GG(x1, x2, x3, x4)  =  U8_GG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains

(17) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(18) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

U8_GG(T105, T106, T107, lessE_out_gg(T105, T106)) → ORDEREDD_IN_GG(T106, T107)
ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T105, T106, T107, lessE_in_gg(T105, T106))

The TRS R consists of the following rules:

lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))

The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
ORDEREDD_IN_GG(x1, x2)  =  ORDEREDD_IN_GG(x1, x2)
U8_GG(x1, x2, x3, x4)  =  U8_GG(x2, x3, x4)

We have to consider all (P,R,Pi)-chains

(19) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(20) Obligation:

Q DP problem:
The TRS P consists of the following rules:

U8_GG(T106, T107, lessE_out_gg) → ORDEREDD_IN_GG(T106, T107)
ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T106, T107, lessE_in_gg(T105, T106))

The TRS R consists of the following rules:

lessE_in_gg(0, T116) → lessE_out_gg
lessE_in_gg(s(T121), T122) → U11_gg(lessF_in_gg(T121, T122))
U11_gg(lessF_out_gg) → lessE_out_gg
lessF_in_gg(0, s(T129)) → lessF_out_gg
lessF_in_gg(s(T134), s(T135)) → U10_gg(lessF_in_gg(T134, T135))
U10_gg(lessF_out_gg) → lessF_out_gg

The set Q consists of the following terms:

lessE_in_gg(x0, x1)
U11_gg(x0)
lessF_in_gg(x0, x1)
U10_gg(x0)

We have to consider all (P,Q,R)-chains.

(21) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • ORDEREDD_IN_GG(T105, .(T106, T107)) → U8_GG(T106, T107, lessE_in_gg(T105, T106))
    The graph contains the following edges 2 > 1, 2 > 2

  • U8_GG(T106, T107, lessE_out_gg) → ORDEREDD_IN_GG(T106, T107)
    The graph contains the following edges 1 >= 1, 2 >= 2

(22) YES

(23) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → APPB_IN_GGA(T66, T67, X92)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
APPB_IN_GGA(x1, x2, x3)  =  APPB_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

(24) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(25) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPB_IN_GGA(.(T65, T66), T67, .(T65, X92)) → APPB_IN_GGA(T66, T67, X92)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPB_IN_GGA(x1, x2, x3)  =  APPB_IN_GGA(x1, x2)

We have to consider all (P,R,Pi)-chains

(26) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(27) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPB_IN_GGA(.(T65, T66), T67) → APPB_IN_GGA(T66, T67)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(28) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPB_IN_GGA(.(T65, T66), T67) → APPB_IN_GGA(T66, T67)
    The graph contains the following edges 1 > 1, 2 >= 2

(29) YES

(30) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → APPA_IN_AGAG(X63, T42, X64, T44)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
APPA_IN_AGAG(x1, x2, x3, x4)  =  APPA_IN_AGAG(x2, x4)

We have to consider all (P,R,Pi)-chains

(31) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(32) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

APPA_IN_AGAG(.(T43, X63), T42, X64, .(T43, T44)) → APPA_IN_AGAG(X63, T42, X64, T44)

R is empty.
The argument filtering Pi contains the following mapping:
.(x1, x2)  =  .(x1, x2)
APPA_IN_AGAG(x1, x2, x3, x4)  =  APPA_IN_AGAG(x2, x4)

We have to consider all (P,R,Pi)-chains

(33) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(34) Obligation:

Q DP problem:
The TRS P consists of the following rules:

APPA_IN_AGAG(T42, .(T43, T44)) → APPA_IN_AGAG(T42, T44)

R is empty.
Q is empty.
We have to consider all (P,Q,R)-chains.

(35) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • APPA_IN_AGAG(T42, .(T43, T44)) → APPA_IN_AGAG(T42, T44)
    The graph contains the following edges 1 >= 1, 2 > 2

(36) YES

(37) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_GG(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → PERMC_IN_GG(T91, T78)

The TRS R consists of the following rules:

ssG_in_gg([], []) → ssG_out_gg([], [])
ssG_in_gg(T13, .(T14, T15)) → U12_gg(T13, T14, T15, appA_in_agag(X23, T14, X24, T13))
appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U12_gg(T13, T14, T15, appA_out_agag(X23, T14, X24, T13)) → ssG_out_gg(T13, .(T14, T15))
ssG_in_gg(T13, .(T14, T15)) → U13_gg(T13, T14, T15, appA_in_agag(T20, T14, T21, T13))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U14_gg(T13, T14, T15, appB_in_gga(T20, T21, X25))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))
U14_gg(T13, T14, T15, appB_out_gga(T20, T21, X25)) → ssG_out_gg(T13, .(T14, T15))
U13_gg(T13, T14, T15, appA_out_agag(T20, T14, T21, T13)) → U15_gg(T13, T14, T15, appB_in_gga(T20, T21, T51))
U15_gg(T13, T14, T15, appB_out_gga(T20, T21, T51)) → U16_gg(T13, T14, T15, permC_in_gg(T51, T15))
permC_in_gg([], []) → permC_out_gg([], [])
permC_in_gg(T76, .(T77, T78)) → U3_gg(T76, T77, T78, appA_in_agag(X107, T77, X108, T76))
U3_gg(T76, T77, T78, appA_out_agag(X107, T77, X108, T76)) → permC_out_gg(T76, .(T77, T78))
permC_in_gg(T76, .(T77, T78)) → U4_gg(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U5_gg(T76, T77, T78, appB_in_gga(T83, T84, X109))
U5_gg(T76, T77, T78, appB_out_gga(T83, T84, X109)) → permC_out_gg(T76, .(T77, T78))
U4_gg(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_gg(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_gg(T76, T77, T78, appB_out_gga(T83, T84, T91)) → U7_gg(T76, T77, T78, permC_in_gg(T91, T78))
U7_gg(T76, T77, T78, permC_out_gg(T91, T78)) → permC_out_gg(T76, .(T77, T78))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → ssG_out_gg(T13, .(T14, T15))
U16_gg(T13, T14, T15, permC_out_gg(T51, T15)) → U17_gg(T13, T14, T15, orderedD_in_gg(T14, T15))
orderedD_in_gg(T98, []) → orderedD_out_gg(T98, [])
orderedD_in_gg(T105, .(T106, T107)) → U8_gg(T105, T106, T107, lessE_in_gg(T105, T106))
lessE_in_gg(0, T116) → lessE_out_gg(0, T116)
lessE_in_gg(s(T121), T122) → U11_gg(T121, T122, lessF_in_gg(T121, T122))
lessF_in_gg(0, s(T129)) → lessF_out_gg(0, s(T129))
lessF_in_gg(s(T134), s(T135)) → U10_gg(T134, T135, lessF_in_gg(T134, T135))
U10_gg(T134, T135, lessF_out_gg(T134, T135)) → lessF_out_gg(s(T134), s(T135))
U11_gg(T121, T122, lessF_out_gg(T121, T122)) → lessE_out_gg(s(T121), T122)
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → orderedD_out_gg(T105, .(T106, T107))
U8_gg(T105, T106, T107, lessE_out_gg(T105, T106)) → U9_gg(T105, T106, T107, orderedD_in_gg(T106, T107))
U9_gg(T105, T106, T107, orderedD_out_gg(T106, T107)) → orderedD_out_gg(T105, .(T106, T107))
U17_gg(T13, T14, T15, orderedD_out_gg(T14, T15)) → ssG_out_gg(T13, .(T14, T15))

The argument filtering Pi contains the following mapping:
ssG_in_gg(x1, x2)  =  ssG_in_gg(x1, x2)
[]  =  []
ssG_out_gg(x1, x2)  =  ssG_out_gg
.(x1, x2)  =  .(x1, x2)
U12_gg(x1, x2, x3, x4)  =  U12_gg(x4)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
U13_gg(x1, x2, x3, x4)  =  U13_gg(x2, x3, x4)
U14_gg(x1, x2, x3, x4)  =  U14_gg(x4)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
U15_gg(x1, x2, x3, x4)  =  U15_gg(x2, x3, x4)
U16_gg(x1, x2, x3, x4)  =  U16_gg(x2, x3, x4)
permC_in_gg(x1, x2)  =  permC_in_gg(x1, x2)
permC_out_gg(x1, x2)  =  permC_out_gg
U3_gg(x1, x2, x3, x4)  =  U3_gg(x4)
U4_gg(x1, x2, x3, x4)  =  U4_gg(x3, x4)
U5_gg(x1, x2, x3, x4)  =  U5_gg(x4)
U6_gg(x1, x2, x3, x4)  =  U6_gg(x3, x4)
U7_gg(x1, x2, x3, x4)  =  U7_gg(x4)
U17_gg(x1, x2, x3, x4)  =  U17_gg(x4)
orderedD_in_gg(x1, x2)  =  orderedD_in_gg(x1, x2)
orderedD_out_gg(x1, x2)  =  orderedD_out_gg
U8_gg(x1, x2, x3, x4)  =  U8_gg(x2, x3, x4)
lessE_in_gg(x1, x2)  =  lessE_in_gg(x1, x2)
0  =  0
lessE_out_gg(x1, x2)  =  lessE_out_gg
s(x1)  =  s(x1)
U11_gg(x1, x2, x3)  =  U11_gg(x3)
lessF_in_gg(x1, x2)  =  lessF_in_gg(x1, x2)
lessF_out_gg(x1, x2)  =  lessF_out_gg
U10_gg(x1, x2, x3)  =  U10_gg(x3)
U9_gg(x1, x2, x3, x4)  =  U9_gg(x4)
PERMC_IN_GG(x1, x2)  =  PERMC_IN_GG(x1, x2)
U4_GG(x1, x2, x3, x4)  =  U4_GG(x3, x4)
U6_GG(x1, x2, x3, x4)  =  U6_GG(x3, x4)

We have to consider all (P,R,Pi)-chains

(38) UsableRulesProof (EQUIVALENT transformation)

For (infinitary) constructor rewriting [LOPSTR] we can delete all non-usable rules from R.

(39) Obligation:

Pi DP problem:
The TRS P consists of the following rules:

PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T76, T77, T78, appA_in_agag(T83, T77, T84, T76))
U4_GG(T76, T77, T78, appA_out_agag(T83, T77, T84, T76)) → U6_GG(T76, T77, T78, appB_in_gga(T83, T84, T91))
U6_GG(T76, T77, T78, appB_out_gga(T83, T84, T91)) → PERMC_IN_GG(T91, T78)

The TRS R consists of the following rules:

appA_in_agag([], T34, T35, .(T34, T35)) → appA_out_agag([], T34, T35, .(T34, T35))
appA_in_agag(.(T43, X63), T42, X64, .(T43, T44)) → U1_agag(T43, X63, T42, X64, T44, appA_in_agag(X63, T42, X64, T44))
appB_in_gga([], T58, T58) → appB_out_gga([], T58, T58)
appB_in_gga(.(T65, T66), T67, .(T65, X92)) → U2_gga(T65, T66, T67, X92, appB_in_gga(T66, T67, X92))
U1_agag(T43, X63, T42, X64, T44, appA_out_agag(X63, T42, X64, T44)) → appA_out_agag(.(T43, X63), T42, X64, .(T43, T44))
U2_gga(T65, T66, T67, X92, appB_out_gga(T66, T67, X92)) → appB_out_gga(.(T65, T66), T67, .(T65, X92))

The argument filtering Pi contains the following mapping:
[]  =  []
.(x1, x2)  =  .(x1, x2)
appA_in_agag(x1, x2, x3, x4)  =  appA_in_agag(x2, x4)
appA_out_agag(x1, x2, x3, x4)  =  appA_out_agag(x1, x3)
U1_agag(x1, x2, x3, x4, x5, x6)  =  U1_agag(x1, x6)
appB_in_gga(x1, x2, x3)  =  appB_in_gga(x1, x2)
appB_out_gga(x1, x2, x3)  =  appB_out_gga(x3)
U2_gga(x1, x2, x3, x4, x5)  =  U2_gga(x1, x5)
PERMC_IN_GG(x1, x2)  =  PERMC_IN_GG(x1, x2)
U4_GG(x1, x2, x3, x4)  =  U4_GG(x3, x4)
U6_GG(x1, x2, x3, x4)  =  U6_GG(x3, x4)

We have to consider all (P,R,Pi)-chains

(40) PiDPToQDPProof (SOUND transformation)

Transforming (infinitary) constructor rewriting Pi-DP problem [LOPSTR] into ordinary QDP problem [LPAR04] by application of Pi.

(41) Obligation:

Q DP problem:
The TRS P consists of the following rules:

PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T78, appA_in_agag(T77, T76))
U4_GG(T78, appA_out_agag(T83, T84)) → U6_GG(T78, appB_in_gga(T83, T84))
U6_GG(T78, appB_out_gga(T91)) → PERMC_IN_GG(T91, T78)

The TRS R consists of the following rules:

appA_in_agag(T34, .(T34, T35)) → appA_out_agag([], T35)
appA_in_agag(T42, .(T43, T44)) → U1_agag(T43, appA_in_agag(T42, T44))
appB_in_gga([], T58) → appB_out_gga(T58)
appB_in_gga(.(T65, T66), T67) → U2_gga(T65, appB_in_gga(T66, T67))
U1_agag(T43, appA_out_agag(X63, X64)) → appA_out_agag(.(T43, X63), X64)
U2_gga(T65, appB_out_gga(X92)) → appB_out_gga(.(T65, X92))

The set Q consists of the following terms:

appA_in_agag(x0, x1)
appB_in_gga(x0, x1)
U1_agag(x0, x1)
U2_gga(x0, x1)

We have to consider all (P,Q,R)-chains.

(42) QDPSizeChangeProof (EQUIVALENT transformation)

By using the subterm criterion [SUBTERM_CRITERION] together with the size-change analysis [AAECC05] we have proven that there are no infinite chains for this DP problem.

From the DPs we obtained the following set of size-change graphs:

  • U4_GG(T78, appA_out_agag(T83, T84)) → U6_GG(T78, appB_in_gga(T83, T84))
    The graph contains the following edges 1 >= 1

  • U6_GG(T78, appB_out_gga(T91)) → PERMC_IN_GG(T91, T78)
    The graph contains the following edges 2 > 1, 1 >= 2

  • PERMC_IN_GG(T76, .(T77, T78)) → U4_GG(T78, appA_in_agag(T77, T76))
    The graph contains the following edges 2 > 1

(43) YES